﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Diagnostics;

namespace FunctionPoint.Adornment
{
    /// <summary>
    /// Interaction logic for FunctionPointViewPortAdornmentControl.xaml
    /// </summary>
    public partial class FunctionPointViewPortAdornmentControl : UserControl
    {

        public static DependencyProperty TitleProperty =
            DependencyProperty.Register("Title", typeof(string), typeof(FunctionPointViewPortAdornmentControl));

        public string Title
        {
            get
            {
                return (string)GetValue(TitleProperty);
            }
            set
            {

                SetValue(TitleProperty, value);
            }
        }
        public FunctionPointViewPortAdornmentControl()
        {
            InitializeComponent();
        }



        private void StackPanel_PreviewDragEnter(object sender, DragEventArgs e)
        {
            e.Effects = DragDropEffects.Link | DragDropEffects.Copy;
            Debug.WriteLine("StackPanel_PreviewDragEnter, Effects:{0}\r\nOriginalSource:{1}", e.Effects, e.OriginalSource);
        }

        private void StackPanel_PreviewDragOver(object sender, DragEventArgs e)
        {
            Debug.WriteLine("StackPanel_PreviewDragOver, Effects:{0}\r\nOriginalSource:{1}", e.Effects, e.OriginalSource);
            e.Effects = DragDropEffects.Link | DragDropEffects.Copy;
        }

        private void StackPanel_PreviewDrop(object sender, DragEventArgs e)
        {
            Debug.WriteLine("StackPanel_PreviewDrop, Effects:{0}\r\nOriginalSource:{1}", e.Effects, e.OriginalSource);
            e.Effects = DragDropEffects.Link | DragDropEffects.Copy;
        }

        private void StackPanel_PreviewGiveFeedback(object sender, GiveFeedbackEventArgs e)
        {
            // should check to see if there is code
            Debug.WriteLine("StackPanel_PreviewGiveFeedback, Effects:{0}\r\nOriginalSource:{1}", e.Effects, e.OriginalSource);
            return;
        }

        private void StackPanel_PreviewQueryContinueDrag(object sender, QueryContinueDragEventArgs e)
        {
            Debug.WriteLine("StackPanel_PreviewQueryContinueDrag, Effects:{0}\r\nOriginalSource:{1}", e.Action, e.OriginalSource);
            return;
        }

        private void StackPanel_Drop(object sender, DragEventArgs e)
        {

            Debug.WriteLine("\r\nStackPanel_Drop:OriginalSource:{0}:RoutedEvent:{1}:Handled:{2}", e.OriginalSource, e.RoutedEvent, e.Handled);
            
        }
    }
}
